
/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"EF65FE1D-5D89-4088-B7F0-9A666877B2DA"}
 */
function onShow(firstShow, event) {
	controller.readOnly = true
}

/**
 * Handle record selected.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"1142CFB3-CE55-4299-A2E4-357DB0251B18"}
 */
function onRecordSelection(event) {
	if (hoteles_to_mnemotec != null)
		hoteles_to_hotelhab.newRecord()
	{
		var $rel = hotelhab_to_hoteles.hoteles_to_mnemotec.mnemotec_to_tarifari
		var $tipos_hab = new Array()
		
		for (var i = 1 ; i <= $rel.getSize() ; i++)
		{
			var $reg = $rel.getRecord(i)
			var $tipo = $reg.tari_desde.substr(9,4)
			$tipos_hab.push($tipo)
		}
		application.setValueListItems('tipos_habitacion',$tipos_hab)
	}
}
